Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove useless type cast on aggregated value #39063

Merged
merged 1 commit into from
May 1, 2020

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Apr 27, 2020

Related #39039.

Currently PostgreSQL adapter is the only adapter that rely on type
casting by result.column_types, now the adapter can return numeric
value without type casting by Active Record side.
So we can remove that useless type cast on aggregated value.

kamipo added a commit to kamipo/rails that referenced this pull request Apr 27, 2020
This is required for rails#39063 to use `PG::TextDecoder::Numeric`.

Ref ged/ruby-pg#25.

The pg gem 1.1.0 was released at August 24, 2018, so I think it is good
timing to bump the required version for improving and cleaning up the
code base.

https://rubygems.org/gems/pg/versions
Related rails#39039.

Currently PostgreSQL adapter is the only adapter that rely on type
casting by `result.column_types`, now the adapter can return numeric
value without type casting by Active Record side.
So we can remove that useless type cast on aggregated value.
@kamipo kamipo force-pushed the remove_useless_typecast_on_aggregation branch from 847b395 to e10765c Compare April 29, 2020 07:28
@kamipo kamipo merged commit 0ce8d45 into rails:master May 1, 2020
@kamipo kamipo deleted the remove_useless_typecast_on_aggregation branch May 1, 2020 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants